#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
/*
    unsigned int alarm(unsigned int seconds)：
        进程每隔参数隔时间，就会收到SIGALRM信号
        其返回值为上一次闹钟剩余秒数
*/
int main()
{
    int a = alarm(5);
    printf("a1==%d\n", a);

    a = alarm(3);
    printf("a2==%d\n", a);

    alarm(0);//取消闹钟
    while (1);
}